package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;


/**
 * @Author FengHuan Wang
 * @Date 2025/1/2 10:22
 * @Version 1.0
 */
@Mapper
public interface UserMapper {

    @Select("select  * from user where openid = #{openid}")
    User getByOpenId(String openid);

    void insert(User user);

    @Select("select * from user where id = #{userId}")
    User getById(Long userId);

    Integer countByMap(Map map);
}
